package com.apexedu.portal.action;

import com.apexedu.framework.service.BaseService;
import com.apexedu.sys.action.AbstractBaseActionSupport;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 推送服务订阅
 * Created by 杨建亮 on 2015-09-15.
 */

@SuppressWarnings("serial")
@Component
@Scope("prototype")
public class PortalServicePushAction extends AbstractBaseActionSupport {

    String serviceSortId = "14080815362233310002";//服务类型编号（系统默认服务；用户自订阅服务）。要从各项目现场确认 t_fw 表的 dyfw对应wid 值。

    String serviceMenuId = "";//要推送的服务资源 menuid

    String toRoleId = "";//接收推送的角色的给角色编号

    /**
     * 此方法植入service类
     */
    @Resource(name = "portalServicePushService")
    public void setBaseService(BaseService baseService) {
        super.setBaseService(baseService);
    }

    /**
     * 推送服务资源到用户的已订阅
     *
     * @return
     */
    public String pushToUser() {

        return toView("input.jsp");
    }
}
